package count;

public class Count01 {
    public static void sort(int[] arr,int low,int high){
        int[] count = new int[high - low + 1];
        int[] result = new int[arr.length];
        for (int i : arr) {
            count[i]++;
        }
        for (int i = 0; i < result.length; i++) {
            for (int j = 0; j < count.length; j++) {
                while (count[j]-- > 0){
                    result[i++] = j;
                }
            }
        }
        for (int i = 0; i < arr.length; i++) {
            arr[i] = result[i];
        }
    }
}
